from flask import Flask, request, jsonify
from unbind_authorization import *
app = Flask(__name__)



@app.route('/xhs/unbind/DeleteUser', methods=['GET','POST'])
def process_data():
    try:
        if request.method == 'POST':
            data = request.get_json()
            xhs_account = data["xhs_account"]

            result = unbind_authorization_xhs_user(xhs_account)
            print(result)
            return result

        else:
            xhs_account = request.args["xhs_account"]
            result = unbind_authorization_xhs_user(xhs_account)
            return result
    except:
        return {"msg":"未传参数","code":"500"}


if __name__ == '__main__':

    app.run(host='0.0.0.0',port=5006,threaded=True)